﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Code.BLL.Arithmetic.Comm;

namespace Code.BLL.Arithmetic
{
    /// <summary>
    /// P3
    /// </summary>
    internal class TCP3 : LotteryTypeProduct
    {
        private string _OpenCode;
        public override PlayTypeProduct GetPlayType(Code.Models.PlayType_E playType)
        {
            PlayTypeProduct product;
            //直选、组选、直选和值、组选和值、不定位、前一、后一、前二、后二
            switch (playType)
            {
                case Code.Models.PlayType_E.ZhiXuan:
                    product = new ZhiShuan(regZhiShuan);break;
                case Code.Models.PlayType_E.ZuXuan:
                    product = new ZuShuan(regZuShuan);break;
                case Code.Models.PlayType_E.ZhiXuanHeZhi:
                    product = new ZhiShuanHeZhi(regZhiShuanHeZhi);break;
                case Code.Models.PlayType_E.ZuXuanHeZhi:
                    product = new ZuShuanHeZhi(regZuShuanHeZhi);break;
                case Code.Models.PlayType_E.HouSanBuDingWeiDan:
                    product = new HouSanBuDingWeiDan(regHouSanBuDingWeiDan);break;
                case Code.Models.PlayType_E.QianYi:
                    product = new QianYi(regQianYi);break;
                case Code.Models.PlayType_E.HouYi:
                    product = new HouYi(regHouYi);break;
                case Code.Models.PlayType_E.Qianer:
                    product = new Qianer(regQianer);break;
                case Code.Models.PlayType_E.Houer:
                    product = new Houer(regHouer);break;
                default:
                    throw new Exception("体彩P3彩种没有当前玩法:"+playType);
            }
            return product;
        }
        private static Regex regZhiShuan = RegexFormats.ThreeStar;

        private static Regex regZuShuan = regZhiShuan;

        private static Regex regZhiShuanHeZhi = RegexFormats.ZhiHe;

        private static Regex regZuShuanHeZhi = RegexFormats.ZuHe;

        private static Regex regQianYi = RegexFormats.OneStar;

        private static Regex regHouYi = regQianYi;

        private static Regex regHouSanBuDingWeiDan = regQianYi;

        private static Regex regQianer = RegexFormats.TwoStar;

        private static Regex regHouer = regQianYi;
    }
}
